#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
using namespace std;
class Solution {
public:
    vector<int> divisibilityArray(string word, int m) {
        long long cur = 0;
        vector<int> res;
        for(char &c : word) {
            cur = (cur * 10 + (c - '0')) % m;
            cur == 0 ? res.push_back(1) : res.push_back(0); 
        }
        return res;
    }
};